<%@ include file="../base.jsp"%>
<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<sys:genericTag4o id="roleList" methodName="queryRoleList" className="com.wxy.controller.taglib.SecurityTag"/>
<sys:genericTag4o id="empList"  methodName="getEmpList"  className="com.wxy.controller.taglib.SecurityTag"/>
<sys:genericTag4o id="authList" methodName="getAuthList" className="com.wxy.controller.taglib.SecurityTag"/>
<sys:genericTag4o id="deptList" methodName="getDeptList" className="com.wxy.controller.taglib.SecurityTag"/>
<sys:genericTag4o id="empList2" methodName="getEmpListWaiting" className="com.wxy.controller.taglib.SecurityTag"/>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>    
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
<link rel="stylesheet" type="text/css" href="../../js/jquery/easyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="../../js/jquery/easyui/themes/icon.css">
<script type="text/javascript" src="../../js/jquery-1.8.0.min.js"></script>
<script src="../../js/jquery/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript">
$(function(){
	$('#tt1').tree();
});
</script>

</head>
<body>
<a href="index.jsp">security first page</a>
<br/><br/>
<font color="red">
<s:property value="#attr.result"/>
</font>
<br/>
<br/>
<div style="width: 500px; " >
	<ul id="tt1" url="empJson.jsp" animate="true"></ul>
</div>

<br/><br/>
<s:form action="security_addDept.action" namespace="/admin123/security" theme="simple">
<table border="1"  bordercolor="#99BBE8" cellpadding="1" cellspacing="1">
	<caption>增加部门</caption>
	<tr>
		<td>部门名称:<input name="deptName"/></td>
		<td>
			<input type="submit" value="增加">
		</td>
	</tr>
</table>
</s:form>
<br/>

<s:form action="security_addEmp.action" namespace="/admin123/security" theme="simple">
<table border="1"  bordercolor="#99BBE8" cellpadding="1" cellspacing="1">
	<caption>注册用户</caption>
	<tr>
		<td>用户名:<input type="text" name="loginname"/></td>
		<td>密码:<input type="password" name="password"/></td>
		<td>姓名:<input type="text" name="name"/></td>
		<td>性别:<input type="radio" name="sex" value="Male"/>Male
		        <input type="radio" name="sex" value="Female"/>Female
		</td>
	</tr>
	<tr>
		<td>所属部门:
			<s:select
			    list="#attr.deptList"
				listKey="id"
				listValue="name"
				headerKey=""
				headerValue="请选择"
				theme="simple"
				name="deptId"
			    />
		</td>
		<td>图相:<input/></td>
		<td>
			<input type="submit" value="注册">
		</td>
	</tr>
</table>
</s:form>
<br/>

<s:form action="security_activeEmp.action" namespace="/admin123/security" theme="simple">
<table border="1"  bordercolor="#99BBE8" cellpadding="1" cellspacing="1">
	<caption>激活用户</caption>
	<tr>
		<td>待激活用户:</td>
		<td>
			<s:select
				name="empId"
			    list="#attr.empList2"
				listKey="id"
				listValue="name"
				headerKey=""
				headerValue="请选择"
				theme="simple"
				/>
			
		</td>
		<td>
			<input type="submit" value="激活">
		</td>
	</tr>
</table>
</s:form>
<br/>
<s:form action="security_addRole.action" namespace="/admin123/security" theme="simple">
<table border="1"  bordercolor="#99BBE8" cellpadding="1" cellspacing="1">
	<caption>增加角色</caption>
	<tr>
		<td>角色名:</td>
		<td>
			<input type="text" name="roleName">
		</td>
		<td>
			<input type="submit" value="增加">
		</td>
	</tr>
</table>
</s:form>
<br/>

<s:form action="security_addRole2Emp.action" namespace="/admin123/security" theme="simple">
<table border="1"  bordercolor="#99BBE8" cellpadding="1" cellspacing="1">
	<caption>增加角色给用户</caption>
	<tr>
		<td>用户:</td>
		<td>
			<s:select 
				list="#attr.empList"
				listKey="id"
				listValue="name"
				headerKey=""
				headerValue="请选择"
				theme="simple"
				name="empId"
				/>
		</td>
		<td>角色:</td>
		<td>
			<s:select 
				list="#attr.roleList"
				listKey="id"
				listValue="roleName"
				headerKey=""
				headerValue="请选择"
				theme="simple"
				name="roleId"
				/>
		</td>
		<td>
			<input type="submit" value="绑定">
		</td>
	</tr>
</table>
</s:form>
<br/>
<!-- 
<form action="security_addAuthToRole.action" namespace="/admin123/security" theme="simple">
<table border="1"  bordercolor="#99BBE8" cellpadding="1" cellspacing="1">
	<caption>为角色增加权限</caption>
	<tr>
		<td>角色名:</td>
		<td>
			<s:select 
				list="#attr.roleList"
				listKey="id"
				listValue="roleName"
				headerKey=""
				headerValue="请选择"
				theme="simple"
				name="roleId"
				/>
		</td>
		<td>权限名:</td>
		<td>
			<input type="text" name="authName">
		</td>
		<td>
			<input type="submit" value="增加">
		</td>
	</tr>
</table>
</form>
 -->
<br/>
<form action="security_addAuthToRole.action" namespace="/admin123/security" theme="simple">
<table border="1"  bordercolor="#99BBE8" cellpadding="1" cellspacing="1">
	<caption>绑定角色和权限</caption>
	<tr>
		<td>角色名:</td>
		<td>
			<s:select 
				list="#attr.roleList"
				listKey="id"
				listValue="roleName"
				headerKey=""
				headerValue="请选择"
				theme="simple"
				name="roleId"
				/>
		</td>
		<td>权限名:</td>
		<td>
			<s:select 
				list="#attr.authList"
				listKey="id"
				listValue="authName"
				headerKey=""
				headerValue="请选择"
				theme="simple"
				name="authId"
				/>
		</td>
		<td>
			<input type="submit" value="绑定">
		</td>
	</tr>
</table>
</form>
<br/>

<s:form action="security_addAuth.action" namespace="/admin123/security" theme="simple">
<table border="1"  bordercolor="#99BBE8" cellpadding="1" cellspacing="1">
	<caption>添加权限</caption>
	<tr>
		<td>权限名:</td>
		<td>
			<input type="text" name="authName">
		</td>
		<td>权限描述:</td>
		<td>
			<input type="text" name="authDesc">
		</td>
		<td>
			<input type="submit" value="增加">
		</td>
	</tr>
</table>
</s:form>
<br/>

<s:form action="security_addResource2Auth.action" namespace="/admin123/security" theme="simple">
<table border="1"  bordercolor="#99BBE8" cellpadding="1" cellspacing="1">
	<caption>添加资源给权限</caption>
	<tr>
		<td>权限名:</td>
		<td>
			<s:select 
				list="#attr.authList"
				listKey="id"
				listValue="authName"
				headerKey=""
				headerValue="请选择"
				theme="simple"
				name="authId"
				/>
		</td>
		<td>资源名:</td>
		<td>
			<input type="text" name="resourceName">
		</td>
		<td>资源描述:</td>
		<td>
			<input type="text" name="resourceDesc">
		</td>
		<td>
			<input type="submit" value="增加">
		</td>
	</tr>
</table>
</s:form>

<br/>
<br/>
</body>
</html>